#include <stdio.h>

//计算1/1-1/2+1/3-1/4+1/5 …… + 1/99 - 1/100 的值，打印出结果

int main() {
    int num = 0;
    int flag = 1;
    double sum = 0.0;
    scanf("%d", &num);
    for (int i = 1; i <= num; i++) {
        sum += flag * 1.0 / i;
        flag = -flag;
    }
    printf("%f", sum);
    return 0;
}